package com.example.lotterysystem.service;

import com.example.lotterysystem.controller.param.DrawPrizeParam;
import com.example.lotterysystem.controller.param.ShowWinningResultParam;
import com.example.lotterysystem.dao.dataobject.WinningRecordDO;
import com.example.lotterysystem.service.dto.ShowWinningResultDTO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface DrawPrizeService {
    String MESSAGE_ID = "messageId";
    String MESSAGE_DATA = "messageData";

    /**
     * 将中奖信息保存到 rabbitMQ 中
     * @param param
     */
    void drawPrize(DrawPrizeParam param);

    /**
     * 校验抽奖请求信息
     * @param param
     */
    Boolean checkDrawPrizeValid(DrawPrizeParam param);

    /**
     * 保存获奖相关信息
     * @param param
     * @return
     */
    List<WinningRecordDO> saveWinnerRecords(DrawPrizeParam param);

    /**
     * 获取中奖记录
     * @param param
     * @return
     */
    List<ShowWinningResultDTO> showWinningResult(ShowWinningResultParam param);

    /**
     * 删除中奖记录
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(Long activityId, Long prizeId);
}
